package com.wisdomstar.common.core.page;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * @Author: Long chao
 * @Date: Created in 2022/6/29 11:51
 * @Description: 分页
 * @Modified By:
 */
public class Pagination {
    /**
     * 当前页码数
     */
    private final Long pageNum;

    /**
     * 每页多少条数
     */
    private Long pageSize;

    /**
     * 总条数
     */
    private Long total;

    /**
     * 总页数
     */
    private Long totalPage;

    public Pagination(Page<?> page) {
        this.pageNum = page.getCurrent();
        this.pageSize = page.getSize();
        this.total = page.getTotal();
        this.totalPage = page.getPages();
    }
}
